package com.tjsinfo.tjsoa.system.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tjsinfo.tjsoa.system.bo.ISystemPostBO;
import com.tjsinfo.tjsoa.system.vo.TSystemPost;
/**
 * 转向更新岗位表单
 * @author 岳晓磊
 *
 */
public class UpdateToPostAction extends Action {
	private ISystemPostBO systemPostBo; 
	public void setSystemPostBo(ISystemPostBO systemPostBo) {
		this.systemPostBo = systemPostBo;
	}
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		// TODO Auto-generated method stub
		String postId = request.getParameter("postId");
		String first = request.getParameter("first");
		TSystemPost tsp = systemPostBo.findById(postId);
		request.setAttribute("tsp", tsp);
		request.setAttribute("first", first);
		return  mapping.findForward("success");
	}
}
